<?php
	$navAction = array();
	$navActionClass[$option] = ' class="action" ';
?>
<div id="nav">
    
<?php



if( isset( $user ) && $user -> id() != 0  ){    
?>
    <li><a href="<?php echo urlRewrite('option=home&id='.$user -> id());?>" class="navFace"><img src="<?php echo getFace($user -> id()); ?>" /></a></li>
    <li class="home" <?php echo $navActionClass[''] ;?>><a href="<?php echo urlRewrite();?>"><?php echo lang_index;?></a></li>
    <li <?php echo $navActionClass['creatMedia'] ;?>><a href="<?php echo urlRewrite('option=creatMedia');?>"><?php echo lang_upload; ?><span><?php echo lang_works;?></span></a></li>
    <li <?php echo $navActionClass['mylist'] ;?>><a href="<?php echo urlRewrite('option=mylist&id='.$user ->id().'&page=1.html');?>"><?php echo lang_my;?><span><?php echo lang_works;?></span></a></li>
    <li <?php echo $navActionClass['favorites'];?>><a href="<?php echo urlRewrite('option=favorites&id='.$user ->id().'&page=1.html');?>"><?php echo lang_my;?><span><?php echo lang_favorites;?></span></a></li>
    <?php /*<li <?php echo $navActionClass['home'] ;?>><a href="./?option=home">个人<span>设置</span></a></li>*/ ?>
<?php
if( 5 <= $myInfo['powder'] ){    
?>
    <li <?php echo $navActionClass['taskManage'] ;?>><a href="<?php echo HOSTROOT;?>?option=taskManage"><?php echo lang_task;?><span><?php echo lang_manage;?></span></a></li>
<?php
}
?>

<?php
if( 9 <= $myInfo['powder'] ){    
?>
    <li <?php echo $navActionClass['fileManage'] ;?>><a href="<?php echo HOSTROOT;?>?option=fileManage"><?php echo lang_works;?><span><?php echo lang_manage;?></span></a></li>
    <li <?php echo $navActionClass['admin.userManage'] ;?>><a href="<?php echo HOSTROOT;?>?option=admin.userManage"><?php echo lang_user;?><span><?php echo lang_manage;?></span></a></li>
    <li <?php echo $navActionClass['admin.comment'] ;?>><a href="<?php echo HOSTROOT;?>?option=admin.comment"><?php echo lang_comment;?><span><?php echo lang_manage;?></span></a></li>
    <li <?php echo $navActionClass['admin.indexCommend'] ;?>><a href="<?php echo HOSTROOT;?>?option=admin.indexCommend"><?php echo lang_index;?><span><?php echo lang_recommend;?></span></a></li>
    <li <?php echo $navActionClass['admin.sysManage'] ;?>><a href="<?php echo HOSTROOT;?>?option=admin.sysManage"><?php echo lang_system;?><span><?php echo lang_manage;?></span></a></li>
    <li <?php echo $navActionClass['admin.creatThumb'] ;?>><a href="<?php echo HOSTROOT;?>?option=admin.creatThumb">重建<span>缩略图</span></a></li>
<?php
}    
?>    
    <li><a href="<?php echo urlRewrite('option=logout');?>" id="logout"><?php echo lang_logout;?></a></li>
<?php }else{?>
	<li><img src="<?php echo getFace($_SESSION['user_id']); ?>" /></li>    
    <li class="home" <?php echo $navActionClass[''] ;?>><a href="<?php echo urlRewrite();?>"><?php echo lang_index;?></a></li>
	<li <?php echo $navActionClass['login'] ;?>><a href="<?php echo urlRewrite('option=login');?>"><?php echo lang_login;?></a></li>
    <li <?php echo $navActionClass['reg'] ;?>><a href="<?php echo urlRewrite('option=reg');?>"><?php echo lang_reg;?></a></li>
<?php }
?>
</div>